package cn.hongwei.service.base.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
@Data
@Accessors(chain = true)
public class BaseEntity {
    @TableId(type = IdType.ASSIGN_ID) //雪花算法生成id
    private String id;

    @ApiModelProperty(hidden = true) //表示swagger文档中测试时 不显示此属性
    @TableField(fill = FieldFill.INSERT) //自动填充
    private Date gmtCreate;
    @ApiModelProperty(hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
